package com.navi.loaddata.core.oracleEntity;

import javax.persistence.Column;
import javax.persistence.Id;
import java.io.Serializable;
import java.util.Objects;

public class ProductspecPK implements Serializable {
    private String factoryname;
    private String productspecname;
    private String productspecversion;

    @Column(name = "FACTORYNAME")
    @Id
    public String getFactoryname() {
        return factoryname;
    }

    public void setFactoryname(String factoryname) {
        this.factoryname = factoryname;
    }

    @Column(name = "PRODUCTSPECNAME")
    @Id
    public String getProductspecname() {
        return productspecname;
    }

    public void setProductspecname(String productspecname) {
        this.productspecname = productspecname;
    }

    @Column(name = "PRODUCTSPECVERSION")
    @Id
    public String getProductspecversion() {
        return productspecversion;
    }

    public void setProductspecversion(String productspecversion) {
        this.productspecversion = productspecversion;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ProductspecPK that = (ProductspecPK) o;
        return Objects.equals(factoryname, that.factoryname) &&
                Objects.equals(productspecname, that.productspecname) &&
                Objects.equals(productspecversion, that.productspecversion);
    }

    @Override
    public int hashCode() {

        return Objects.hash(factoryname, productspecname, productspecversion);
    }
}
